<#include "../_inc/_layout.html"/>
<#macro script>
function frozen(id){
	$.get("${CPATH}/admin/user/frozen?ucode=${ucode}&id="+id, function(data){
		if(data.errorCode > 0){
			toastr.error(data.message,'操作失败');
		}else{
			location.reload();
		}
	});
}

function restore(id){
	$.get("${CPATH}/admin/user/restore?ucode=${ucode}&id="+id, function(data){
		if(data.errorCode > 0){
			toastr.error(data.message,'操作失败');
		}else{
			location.reload();
		}
	});
}

	function setroll(){
		var roll =document.getElementById('roll').value;
		if("operate"==roll){
			toastr.error('请选择操作','操作失败');
			return;
		}
		$("#form").attr("action","${CPATH}/admin/user/setRoll?roll="+roll);
		$("#form").ajaxSubmit({
				type : "post",
				dataType : "json",
				success : function(result) {
					if(result.errorCode > 0){
						toastr.error(result.message,'操作失败');
					}else{
						location.reload();
					}
				},
				error : function() {
					alert("信息提交错误");
				}
			});
	}

function del(id){
	$.get("${CPATH}/admin/user/delete?ucode=${ucode}&id="+id, function(data){
		if(data.errorCode > 0){
			toastr.error(data.message,'操作失败');
		}else{
			location.reload();
		}
	});
}
</#macro>
<@layout active_id=p child_active_id=c>
<#include include/>
</@layout>



